package net.mfjassociates.financial.client.managed.ui;

import com.google.gwt.requestfactory.ui.client.ProxyRenderer;
import net.mfjassociates.financial.client.managed.request.DocumentProxy;
import net.mfjassociates.financial.shared.domain.Category;

public class DocumentProxyRenderer extends ProxyRenderer<DocumentProxy> {

    private static net.mfjassociates.financial.client.managed.ui.DocumentProxyRenderer INSTANCE;

    protected DocumentProxyRenderer() {
        super(new String[] { "iden" });
    }

    public static net.mfjassociates.financial.client.managed.ui.DocumentProxyRenderer instance() {
        if (INSTANCE == null) {
            INSTANCE = new DocumentProxyRenderer();
        }
        return INSTANCE;
    }

    public String render(DocumentProxy object) {
        if (object == null) {
            return "";
        }
        return object.getIden() + " (" + object.getId() + ")";
    }
}
